<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="__CSS__/style_forum.css">
	<link rel="stylesheet" href="__CSS__/style_view.css">
	<link rel="stylesheet" href="__CSS__/reset.css">
	{eq name="s_id" value='0'}
	<title>论坛 - ThinkPHP</title>
	{else/}
	{volist name="sec" id="secRow"}
	{eq name="s_id" value='$secRow.s_id'}
	<title>{$secRow.s_name} - ThinkPHP</title>
	{/eq}
	{/volist}
	{/eq}
	<script type="text/javascript" src="__JS__/jquery-3.4.1.min.js"></script>
	<script type="text/javascript" src="__JS__/loadinghtml.js"></script>
	<script type="text/javascript" src="__JS__/DropDown.js"></script>
	<script type="text/javascript">
		function ord_btn(id='m_createat') {
			var c = document.getElementById(id);
			c.setAttribute("class", "selected")
		}
		function sec_btn(id) {
			var c = document.getElementById(id);
			c.setAttribute("class", "item current")
		}
		function submitForm() {
			var sec = document.getElementById('showLines');
			if (sec.value!='') {
				var form = document.getElementById('lpp');
				form.submit();
			}
		}
		function lines(L) {
			var sec = document.getElementById('showLines');
			var opt = sec.getElementsByTagName("option")[L];
			opt.selected = true;
		}
	</script>
</head>
<body onload="sec_btn('{$s_id}');ord_btn('{:input(\'ot\')}');lines('{$L}')">
	<div id="header" class="top">
		<div id="hd-main">
			<a id="alink" href="{:url('index/index')}" title="返回首页"></a>
			<ul id="main-nav">
				<li><a href="{:url('index/index')}">首页</a></li>
				<li style="background-color: #656565" id="triggerdown">
					<a href="{:url('index/view',['s_id'=>0,'ot'=>'m_createat'])}">论坛</a>
					<ul id="dropdown">
						<li><a href="{:url('index/view',['s_id'=>0,'ot'=>'m_createat'])}">全部</a></li>
						{volist name="sec" id="secRow"}
						<li><a href="{:url('index/view',['s_id'=>$secRow.s_id,'ot'=>'m_createat'])}">{$secRow.s_name}</a></li>
						{/volist}
					</ul>
				</li>
				<li><a href="{:url('index/pa')}">修改密码</a></li>
				<li><a href="{:url('index/me')}">上传头像</a></li>
				<li><a href="{:url('user/login')}">登录</a></li>
				<li><a href="{:url('user/reg')}">注册</a></li>
				<li><a href="{:url('index/logout')}">退出</a></li>
				<li><a href="{:url('user/contact')}">联系我们</a></li>
			</ul>
			<div id="header-bar">
				{eq name=':session("user")' value=''}
				<h3>欢迎你，请登录</h3>
				<div id="userloginmes">
					<a href="{:url('user/login')}" id="unlogin">
						<b></b>
					</a>
					<ul>
						<li><a href="{:url('user/login')}">登录</a></li>
						<li><a href="{:url('user/reg')}">注册</a></li>
					</ul>
				</div>
				{else/}
				<h3>欢迎你，{:session('user')}</h3>
				<div id="userloginmes">
					<a href="" id="unlogin">
						<img src="__POT__/{:session('uimg')}" width="24px" height="24px">
					</a>
					<ul>
						<a href="{:url('index/collect')}"><li>我的收藏</li></a>
						<a href="{:url('index/logout')}"><li>退出</li></a>
					</ul>
				</div>
				{/eq}
			</div>
		</div>
	</div>
	<div id="main">
		<div id="sort-box">
			<span id="sort-labs"><i></i></span>
			<a href="{:url('index/view',['s_id'=>0,'ot'=>'m_createat'])}" class="item" id="0">全部&nbsp;&nbsp;<em>{$mesall}</em></a>
			{volist name="sec" id="secRow"}
			{volist name="mt" id="mtRow"}
			{if $mtRow.s_id==$secRow.s_id}
			<a href="{:url('index/view',['s_id'=>$secRow.s_id,'ot'=>'m_createat'])}" class="item" id="{$secRow.s_id}">{$secRow.s_name}&nbsp;&nbsp;<em>{$mtRow.mtotal}</em></a>
			{/if}
			{/volist}
			{if !in_array($secRow.s_id,$sid)}
			<a href="{:url('index/view',['s_id'=>$secRow.s_id,'ot'=>'m_createat'])}" class="item" id="{$secRow.s_id}">{$secRow.s_name}&nbsp;&nbsp;<em>0</em></a>
			{/if}
			{/volist}
		</div>
		<div id="wrapper">
			{eq name="s_id" value='0'}
			<div id="top-tutorials" class="box">
				<ul>
					<li>
						<a href="http://www.thinkphp.cn/topic/68980.html">官方应用服务市场上线公测——构建生态共赢</a>
						<span>05-22</span>
					</li>
					<li>
						<a href="http://www.thinkphp.cn/topic/67659.html">【推荐】ThinkPHP十四周年福利汇总——助力开发，生态共赢</a>
						<span>02-10</span>
					</li>
					<li>
						<a href="http://www.thinkphp.cn/topic/67456.html">ThinkPHPV6.0.2发布——2020新年快乐</a>
						<span>01-13</span>
					</li>
					<li>
						<a href="http://www.thinkphp.cn/topic/65196.html">如果你注册官网会员就是为了发推广，一律封号处理！</a>
						<span>08-13</span>
					</li>
					<li>
						<a href="http://www.thinkphp.cn/topic/60400.html">ThinkPHP5系列发布安全更新</a>
						<span>12-10</span>
					</li>
					<li>
						<a href="http://www.thinkphp.cn/topic/1972.html">讨论区发帖须知 [ 新手必看 ]</a>
						<span>05-25</span>
					</li>
				</ul>
				<span id="tips"></span>
			</div>
			{/eq}
			<div>
				<img width="720px" height="90px" src="__IMG__/5f5059fcdc008.png" alt="ThinkAPI 统一API调用服务">
			</div>
			<div class="box extend">
				<ul id="about-tab">
					<li id='r_order'><a href="{:url('index/view',['s_id'=>input(\'s_id\'),'ot'=>'r_order'])}">最新回复</a></li>
					<li id='m_createat' class=""><a href="{:url('index/view',['s_id'=>input(\'s_id\'),'ot'=>'m_createat'])}">最新发布</a></li>
					<li><a href="">精品区</a></li>
				</ul>
				<ul class="ext-list">
				{volist name="mes" id="mesRow"}
					<li>
						<a href="" class="avatar">
							<img src="__POT__/{$mesRow.u_img}" width="44px" height="44px">
						</a>
						<div class="hd">
							{eq name="s_id" value="0"}
							<a href="{:url('index/view',['s_id'=>$mesRow.s_id])}">[&nbsp;{$mesRow.s_name}&nbsp;]</a>
							{/eq}
							<a href="{:url('index/detail',['m_id'=>$mesRow.m_id,'page'=>1])}">{$mesRow.m_title}</a>
						</div>
						<div class="ft">
							<span class="fr">{$mesRow.m_createat | date="Y-m-d H:i"}</span>
							<span class="related-info">{$mesRow.u_nick}</span>
							<span class="related-info">浏览：{$mesRow.m_browse} </span>
							{volist name="rt" id="rtRow"}
							{if $rtRow.m_id==$mesRow.m_id}
							<a class="related-info" href="{:url('index/detail',['m_id'=>$mesRow.m_id,'page'=>1])}#comment">评论：{$rtRow.mtotal}</a>
							{/if}
							{/volist}
							{if !in_array($mesRow.m_id,$rid)}
							<a class="related-info" href="{:url('index/detail',['m_id'=>$mesRow.m_id,'page'=>1])}#comment">评论：0</a>
							{/if}
						</div>
					</li>
				{/volist}
				</ul>
			</div>
			{if $mes->total()>5}
			<form action="{:url('index/view',['s_id' => $s_id])}" method="post" id="lpp">
				共{$mes->total()}条，每页显示
				<select name="showLines" id="showLines" onchange="submitForm()">
					<option value="">请选择</option>
					<option value="5">5</option>
					<option value="10">10</option>
					<option value="15">15</option>
					<option value="20">20</option>
				</select>条
			</form>
			{/if}
			<nav id="page">{$page | raw}</nav>
		</div>
		<div id="sidebar">
			<a href="{:url('index/post',['s_id' => $s_id])}" id="upload-app"><i></i>发表话题</a>
			<div id="share" class="box">
				<span>分享到：</span>
				<a href="https://service.weibo.com/share/share.php?url=http%3A%2F%2Fwww.thinkphp.cn%2Ftopic%2Findex.html&appkey=3891435835&title=%23ThinkPHP%E8%AE%A8%E8%AE%BA%23%E8%BF%99%E9%87%8C%E6%9C%89%E4%B8%B0%E5%AF%8C%E7%9A%84ThinkPHP%E8%AE%A8%E8%AE%BA%E5%86%85%E5%AE%B9%EF%BC%8C%E7%9C%8B%E7%9C%8B%E5%A4%A7%E5%AE%B6%E9%83%BD%E5%9C%A8%E8%81%8A%E4%BB%80%E4%B9%88%EF%BC%9F#_loginLayer_1604629984750" id="sina"></a>
				<a href="" id="tencent"></a>
			</div>
			<div id="thinkad">
				<img width="250px" height="250px" src="__IMG__/5f74283d30ecd.jpg">
			</div>
			<div class="box utop">
				<div class="index-hd">
					<i class="t-icon"></i>
					<em>话题达人</em>
				</div>
				<div class="bd">
					<div class="tp-item">
						<a href=""><img src="__POT__/{$uid.u_img}" width="44px" height="44px"></a>
						<div class="user">
							{$uid.u_nick}
							<!-- <i class="icon-approve" title="认证用户"></i> --><br>
							<span class="mr">等级：LV1</span>
							<span>积分：100</span>
						</div>
					</div>
				</div>
			</div>
			<div class="box rank">
				<div class="index-hd">
					<i class="t-icon"></i>
					<em>热门推荐</em>
				</div>
				<ul class="bd">
					<li class="top3">
						<i>1</i>
						<a href="">比RBAC更好的权限认证方式（Auth类认证）</a>
					</li>
				</ul>
			</div>
			<div class="box rank">
				<div class="index-hd">
					<i class="t-new t-icon"></i>
					<em>最新更新</em>
				</div>
				<ul class="bd">
					{neq name='mup' value='0'}
					{volist name="mestop" id="mesRow"}
					<li class="top3">
						<i>{$mup-$mesRow.m_id+1}</i>
						<a href="{:url('index/detail',['m_id'=>$mesRow.m_id,'page'=>1])}">{$mesRow.m_title}</a>
					</li>
					{/volist}
					{/neq}
				</ul>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer"></div>
</body>
</html>